package MySemaphore;

public class MySemaphore {
    public static void main(String[] args) {
        Fun fun = new Fun();
        for (int i = 0; i < 1000; i++) {
            new Thread(()->{
                try {
                    fun.add();
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }).start();
        }
    }
}
